/*
 * atk_lora_01.h
 *
 *  Created on: 2022年2月1日
 *      Author: TamGitsun
 */

#ifndef ATK_LORA_01_H_
#define ATK_LORA_01_H_

#include "tos_k.h"
#include "tos_hal.h"


typedef void (* func_handle_event)(const char * prefix, const char * data, size_t size);


typedef struct atk_lora_recv_event_t
{
	const char * event;
	func_handle_event handler;
	k_tick_t timeout;
} atk_lora_recv_event_t;


int atk_lora_lora_init(hal_uart_port_t uart_port, atk_lora_recv_event_t * events, size_t n_events);

int atk_lora_send(const char *buf, size_t len, char * expected, char * recv_buf, size_t recv_buf_size);


#endif /* ATK_LORA_01_H_ */
